import request from './request'
//  增加文章访问次数
export function addArticleVisitor(articleId) {
  return request({
    url: '/addArticleVisitor',
    method: 'post',
    data: {
      articleId
    }
  })
}
// 添加评论
export function addArticleComment(articleId, author, content, avatar) {
  return request({
    url: '/addArticleComment',
    method: 'post',
    data: {
      articleId,
      author,
      content,
      avatar
    }
  })
}
//  根据文章Id获取评论
export function getArticleCommentById(articleId) {
  return request({
    url: '/getArticleCommentById',
    params: {
      articleId
    }
  })
}
//  更新评论点赞数
export function updateCommentPrefer(id, keywords) {
  return request({
    url: '/updateCommentPrefer',
    method: 'post',
    data: {
      id,
      keywords
    }
  })
}
